#define _CRT_SECURE_NO_WARNINGS 1

#define MAXN 10
#include <stdio.h>


int main()
{
	int i = 0;
	int arr[MAXN][MAXN];
	for (i = 0; i < MAXN; i++)
	{
		int j = 0;
		arr[i][0] = arr[i][i] = 1;
		for (j = 1; j < i; j++)
		{
			arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
		}
	}
	for (i = 0; i < MAXN; i++)
	{
		int j = 0;
		for (j = 0; j <= i ; j++)
		{
			printf("%-3d ",arr[i][j]);
		}
		printf("\n");
	}
	return 0;
}